libxl: support mapping files rather than carrying paths around
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 14 Jul 2010 15:43:49 +0000 (16:43 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 14 Jul 2010 15:43:49 +0000 (16:43 +0100)
commit108be1585379e86d0ab42e6f633fb5a7736b6524
tree21ed9afea7ad2e1ded676b70fb0eaad974747cfe
parentadb8dd84403917b268556c1c80e81f1b4fcdf7a1
libxl: support mapping files rather than carrying paths around

This will allow us to map and then unlink the file and therefore
delete the process on process exit or explicit unmap.

Using the mmaped versions of these files required rewriting build_pv
to use the xc_dom builder functionality directly rather than through
the xc_linux_build "compatibility layer". (The status of the
xc_linux_build interface as a compatibility layer seems a bit dubious
since all existing callers use it but if anything is going to replace
it then libxl seems like the likely candidate).

I'm not thrilled with the definition of the maps lifecycle. This could
be solved by adding a helper function to explicitly free the toplevel
structure.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_dom.c
tools/libxl/xl_cmdimpl.c
tools/ocaml/libs/xl/xl_stubs.c